<?php
/**
 * Created by PhpStorm.
 * User: sqq
 * Date: 2018/07/11
 * Time: 上午11:35
 */
class AhpServiceMktCms extends Eloquent
{
    protected $table = "ahp_service_mkt_cms";


    //mkt
    public function mkt_cms_desc(){
        return $this->hasMany('AhpServiceMktCmsDesc',"service_mkt_cms_id",'ids');
    }

    public static function getMktCmsID($service_id, $type){
        return AhpServiceMktCms::where('service_id',$service_id)->where('type',$type)->get();
    }

    public static function getMktCms($mkt_cms_id, $service_id, $type){
        return AhpServiceMktCms::where('service_id',$mkt_cms_id)->where('service_id',$service_id)->where('type',$type)->get();
    }

}